﻿using System;
using System.Collections;
using System.Text;

namespace HellaDotNet.XmlRPC
{
    public class NzbFiles : CollectionBase
    {
        public void Add(NzbFile file)
        {
            this.InnerList.Add(file);
        }

        public NzbFile this[Int32 index]
        {
            get
            {
                return (NzbFile)this.InnerList[index];
            }
            set
            {
                this.InnerList[index] = value;
            }
        }

        public NzbFile FindById(Int32 id)
        {
            NzbFile result = null;
            foreach (NzbFile nzb in this.InnerList)
            {
                if (nzb.Id.Equals(id)) return nzb;
            }
            return result;
        }
    }
}
